#!/bin/bash
set -e
ulimit -n 1000000

DEPLOY_DIR={{ deploy_dir }}
cd "${DEPLOY_DIR}" || exit 1


exec > >(tee -i -a "{{ cadvisor_log_dir }}/{{ cadvisor_log_filename }}")
exec 2>&1

exec bin/cadvisor \
    --port="{{ cadvisor_port }}" \
    --enable_load_reader=true \
    --docker="{{ cadvisor_docker }}" \
    --docker_root="{{ cadvisor_docker_root_dir }}"
